/*
 * @Description: 四期项目升级后续路由
 */

/**
 * 报表统计
 */
// 库存报表统计
const inventoryReport = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/mainesee/inventoryReport.vue')),
    'inventoryReport'
  );
// 优惠券报表统计
const couponsReport = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/mainesee/couponsReport.vue')),
    'couponsReport'
  );
// 门店统计报表
const storeReport = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/mainesee/storeReport/index.vue')),
    'storeReport'
  );

/**
 * 预警管理相关
 */
// 预警管理
const warningManage = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/warningManage/index.vue')),
    'warningManage'
  );
// 预警管理详情
const warningManageDetail = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/warningManage/detail.vue')),
    'warningManageDetail'
  );
// 预警规整配置
const warningManageConfig = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/warningManage/config.vue')),
    'warningManageConfig'
  );

/**
 * 大区子账号
 */
const subAccount = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/systemmanagement/subAccount')),
    'subAccount'
  );
const subAccountEdit = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/systemmanagement/subAccountEdit')),
    'subAccountEdit'
  );

/**
 * 现金券活动
 */
const cashCoupon = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/coupon/cashCoupon')),
    'cashCoupon'
  );
// 创建现金券活动
const createCashCoupon = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/coupon/createCashCoupon')),
    'createCashCoupon'
  );

// 区域积分抽奖
const regionalPointsLottery = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/LuckdrawActivity/regionalPointsLottery')),
    'regionalPointsLottery'
  );
// 编辑
const regionalPointsLotteryEdit = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/LuckdrawActivity/regionalPointsLotteryEdit')),
    'regionalPointsLotteryEdit'
  );

// 直播抽奖
const liveLottery = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/LuckdrawActivity/liveLottery')),
    'liveLottery'
  );
const liveLotteryEdit = (r) =>
  require.ensure(
    [],
    () => r(require('@/page/LuckdrawActivity/liveLotteryEdit')),
    'liveLotteryEdit'
  );

export const upgradeRouter = [
  {
    path: '/inventoryReport',
    name: 'inventoryReport',
    component: inventoryReport,
  },
  {
    path: '/couponsReport',
    name: 'couponsReport',
    component: couponsReport,
  },
  {
    path: '/storeReport',
    name: 'storeReport',
    component: storeReport,
  },
  {
    path: '/warningManage',
    name: 'warningManage',
    component: warningManage,
  },
  {
    path: '/warningManageDetail',
    name: 'warningManageDetail',
    component: warningManageDetail,
  },
  {
    path: '/warningManageConfig',
    name: 'warningManageConfig',
    component: warningManageConfig,
  },
  {
    path: '/subAccount',
    name: 'subAccount',
    component: subAccount,
  },
  {
    path: '/subAccountEdit',
    name: 'subAccountEdit',
    component: subAccountEdit,
  },
  {
    path: '/cashCoupon',
    name: 'cashCoupon',
    component: cashCoupon,
  },
  {
    path: '/createCashCoupon',
    name: 'createCashCoupon',
    component: createCashCoupon,
  },
  {
    path: '/regionalPointsLottery',
    name: 'regionalPointsLottery',
    component: regionalPointsLottery,
  },
  {
    path: '/regionalPointsLotteryEdit',
    name: 'regionalPointsLotteryEdit',
    component: regionalPointsLotteryEdit,
  },
  {
    path: '/liveLottery',
    name: 'liveLottery',
    component: liveLottery,
  },
  {
    path: '/liveLotteryEdit',
    name: 'liveLotteryEdit',
    component: liveLotteryEdit,
  }
];
